import { Input } from "antd";

interface props {
  name: string; // 名称
  setName: any; // 设置名称
  operaType: string; // 操作类型
}

const QrName = ({ name, operaType, setName }: props) => {
  return (
    <p className="flex mb-24 items-center">
      <span className="title-item w-106 text-right mr-16">
        <span className="text-red-defalut relative top-4 text-lg">*</span> 二维码名称:
      </span>
      <span className="border-1 border-grey-300 border-solid w-450 rounded-sm">
        <Input
          bordered={false}
          value={name}
          disabled={operaType === "update" ? true : false}
          maxLength={15}
          placeholder="名称不会展示给用户，用于企业记录渠道名称或使用场景"
          onChange={(e: any) => {
            setName(e.target.value);
          }}
        />
      </span>
    </p>
  );
};

export default QrName;
